package edu.uc.serviceimpl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import java.util.*;
import edu.uc.bean.*;
import edu.uc.dao.*;
import edu.uc.service.*;

@Service("goodsService")
public class GoodsServiceImpl extends BaseServiceImpl<Goods> implements GoodsService{

	private GoodsDao goodsDao = null;
	
	public GoodsDao getMemberDao() {
		return goodsDao;
	}
	
	@Autowired
	@Qualifier("goodsDao")
	public void setMemberDao(GoodsDao goodsDao) {
		this.goodsDao = goodsDao;
	}
	
	@Override
	public Long insert(Goods bean) {
		// TODO Auto-generated method stub
		return goodsDao.insert(bean);

	}

	@Override
	public Long delete(Long id) {
		// TODO Auto-generated method stub
		return goodsDao.delete(id);

	}

	@Override
	public Long update(Goods bean) {
		// TODO Auto-generated method stub
		return goodsDao.update(bean);
	}

	@Override
	public Goods load(Long id) {
		// TODO Auto-generated method stub
		return goodsDao.load(id);
	}

	@Override
	public List<Goods> list() {
		// TODO Auto-generated method stub
	
		return goodsDao.list();
	}

	@Override
	public Long count() {
		// TODO Auto-generated method stub
		return goodsDao.count();
	}

	@Override
	public Long countByName(String name) {
		// TODO Auto-generated method stub
		return goodsDao.countByName(name);
	}

	@Override
	public Goods loadByName(String name) {
		// TODO Auto-generated method stub
		return goodsDao.loadByName(name);
	}

	@Override
	public List<Goods> pager(Long pageNum, Long pageSize) {
		// TODO Auto-generated method stub
		return goodsDao.pager(pageNum, pageSize);
	}

	@Override
	public List<Goods> pagerByName(String name, Long pageNum, Long pageSize) {
		// TODO Auto-generated method stub
		return goodsDao.pagerByName(name, pageNum, pageSize);
	}

}
